public class Factory {
    public static void main(String[] args) {
        //造一辆车
        Car car=new Car();
        car.init();
    }


    static  class Car{
        public  void init(){
            Framework Framework=new Framework();
            Framework.init();
        }
    }
    static  class Framework{
        public  void init(){
            Buttom buttom=new Buttom();
            buttom.init();
        }
    }
    static  class  Buttom{
        public  void init(){
            Tire tire=new Tire();
            tire.init();
        }
    }
    static  class Tire{
        private  int size=0;
        public  void init(){
            System.out.println("这轮胎是"+size);
        }
    }
}
